home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / standard / exp.z / exp
Encoding:
Text File  |  1998-10-30  |  10.6 KB  |  199 lines

  1.  
  2.  
  3.  
  4. EEEEXXXXPPPP((((3333MMMM))))                                                                EEEEXXXXPPPP((((3333MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      exp, expm1, log, log10, log1p, pow, fexp, expf, fexpm1, expm1f, flog,
  10.      logf, flog10, log10f, flog1p, log1pf, fpow, powf, expl, expm1l, logl,
  11.      log10l, log1pl, powl - exponential, logarithm, power
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<mmmmaaaatttthhhh....hhhh>>>>
  15.  
  16.      ddddoooouuuubbbblllleeee eeeexxxxpppp((((ddddoooouuuubbbblllleeee xxxx))));;;;
  17.      ffffllllooooaaaatttt ffffeeeexxxxpppp((((ffffllllooooaaaatttt xxxx))));;;;
  18.      ffffllllooooaaaatttt eeeexxxxppppffff((((ffffllllooooaaaatttt xxxx))));;;;
  19.      lllloooonnnngggg ddddoooouuuubbbblllleeee eeeexxxxppppllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
  20.      lllloooonnnngggg ddddoooouuuubbbblllleeee eeeexxxxppppmmmm1111llll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
  21.  
  22.      ddddoooouuuubbbblllleeee eeeexxxxppppmmmm1111((((ddddoooouuuubbbblllleeee xxxx))));;;;
  23.      ffffllllooooaaaatttt ffffeeeexxxxppppmmmm1111((((ffffllllooooaaaatttt xxxx))));;;;
  24.      ffffllllooooaaaatttt eeeexxxxppppmmmm1111ffff((((ffffllllooooaaaatttt xxxx))));;;;
  25.  
  26.      ddddoooouuuubbbblllleeee lllloooogggg((((ddddoooouuuubbbblllleeee xxxx))));;;;
  27.      ffffllllooooaaaatttt fffflllloooogggg((((ffffllllooooaaaatttt xxxx))));;;;
  28.      ffffllllooooaaaatttt llllooooggggffff((((ffffllllooooaaaatttt xxxx))));;;;
  29.      lllloooonnnngggg ddddoooouuuubbbblllleeee llllooooggggllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
  30.  
  31.      ddddoooouuuubbbblllleeee lllloooogggg11110000((((ddddoooouuuubbbblllleeee xxxx))));;;;
  32.      ffffllllooooaaaatttt fffflllloooogggg11110000((((ffffllllooooaaaatttt xxxx))));;;;
  33.      ffffllllooooaaaatttt lllloooogggg11110000ffff((((ffffllllooooaaaatttt xxxx))));;;;
  34.      lllloooonnnngggg ddddoooouuuubbbblllleeee lllloooogggg11110000llll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
  35.  
  36.      ddddoooouuuubbbblllleeee lllloooogggg1111pppp((((ddddoooouuuubbbblllleeee xxxx))));;;;
  37.      ffffllllooooaaaatttt fffflllloooogggg1111pppp((((ffffllllooooaaaatttt xxxx))));;;;
  38.      ffffllllooooaaaatttt lllloooogggg1111ppppffff((((ffffllllooooaaaatttt xxxx))));;;;
  39.      lllloooonnnngggg ddddoooouuuubbbblllleeee lllloooogggg1111ppppllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
  40.  
  41.      ddddoooouuuubbbblllleeee ppppoooowwww((((ddddoooouuuubbbblllleeee xxxx,,,, ddddoooouuuubbbblllleeee yyyy))));;;;
  42.      ffffllllooooaaaatttt ppppoooowwwwffff((((ffffllllooooaaaatttt xxxx,,,, ffffllllooooaaaatttt yyyy))));;;;
  43.      lllloooonnnngggg ddddoooouuuubbbblllleeee ppppoooowwwwllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx,,,, \\\\
  44.            lllloooonnnngggg ddddoooouuuubbbblllleeee yyyy))));;;;
  45.  
  46. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  47.      The long double and single-precision routines listed above are only
  48.      available in the standard math library, -_l_m, and in -_l_m_x.
  49.  
  50.      The _e_x_p family return the exponential function of _x, _e**x.
  51.  
  52.      The _e_x_p_m_1 family return exp(x)-1 accurately even for tiny _x.
  53.  
  54.      The _l_o_g functions return the natural logarithm of _x.
  55.  
  56.      The _l_o_g_1_0 functions return the base 10 logarithm of _x.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. EEEEXXXXPPPP((((3333MMMM))))                                                                EEEEXXXXPPPP((((3333MMMM))))
  71.  
  72.  
  73.  
  74.      The _l_o_g_1_p family return log(1+x) accurately even for tiny _x.
  75.  
  76.      _p_o_w(_x,_y), its single-precision counterpart _p_o_w_f(_x,_y), and its long double
  77.      counterpart _p_o_w_l(_x,_y), return x**y.
  78.  
  79. EEEERRRRRRRROOOORRRR ((((dddduuuueeee ttttoooo RRRRoooouuuunnnnddddooooffffffff eeeettttcccc....))))
  80.      _e_x_p(_x), _l_o_g(_x), _e_x_p_m_1(_x) and _l_o_g_1_p(_x) are accurate to within an _u_l_p, and
  81.      _l_o_g_1_0(_x) and _p_o_w(_x,_y) to within about 2 _u_l_ps; an _u_l_p is one _Unit in the
  82.      _Last _Place.  Moderate values of pow are accurate enough that
  83.      _p_o_w(integer,integer) is exact until it is bigger than 2**53 for double.
  84.  
  85. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  86.      In the diagnostics below, functions in the standard math library _l_i_b_m._a,
  87.      are referred to as -_l_m versions, those in math library _l_i_b_m_x._a are
  88.      referred to as -_l_m_x versions, and those in the the BSD math library
  89.      _l_i_b_m_4_3._a are referred to as -_l_m_4_3 versions.
  90.      When NaN is used as an argument, a NaN is returned.  The -_l_m and -_l_m_x
  91.      versions always return the default Quiet NaN and set _e_r_r_n_o to EDOM.  The
  92.      -_l_m_4_3 versions never set _e_r_r_n_o.
  93.      The value of HUGE_VAL is IEEE Infinity.
  94.  
  95.      The _e_x_p functions return HUGE_VAL when the correct value would overflow,
  96.      and return zero if the correct value would underflow. The -_l_m and -_l_m_x
  97.      versions set the value of _e_r_r_n_o to ERANGE for both underflow and
  98.      overflow.
  99.  
  100.      The _l_o_g functions return NaN when _x is less than zero, indicating an
  101.      invalid operation. The -_l_m _a_n_d -_l_m_x versions also set _e_r_r_n_o to EDOM.
  102.      When _x is zero, the _l_o_g functions return -HUGE_VAL.  The -_l_m and -_l_m_x
  103.      versions set _e_r_r_n_o to ERANGE.
  104.  
  105.      The _p_o_w functions return NaN indicating an invalid operation, if _x is
  106.      negative and _y is not an integer. The -_l_m and -_l_m_x versions also set
  107.      _e_r_r_n_o to EDOM.
  108.      When _x is zero and _y is negative, the -_l_m and -_l_m_x versions return
  109.      HUGE_VAL and set _e_r_r_n_o to EDOM.  The -_l_m_4_3 versions return HUGE_VAL.
  110.      When both arguments are zero, the _p_o_w functions return one.
  111.      When the correct value for _p_o_w would overflow or underflow the _p_o_w
  112.      functions return +/-HUGE_VAL or zero, respectively.  The -_l_m and -_l_m_x
  113.      versions set _e_r_r_n_o to ERANGE.
  114.  
  115.      See matherr(3M) for a description of error handling for -_l_m_x functions.
  116.  
  117. NNNNOOOOTTTTEEEESSSS
  118.      Long double operations on this system are only supported in round to
  119.      nearest rounding mode (the default).  The system must be in round to
  120.      nearest rounding mode when calling any of the long double functions, or
  121.      incorrect answers will result.
  122.  
  123.      Users concerned with portability to other computer systems should note
  124.      that the long double and float versions of these functions are optional
  125.      according to the ANSI C Programming Language Specification ISO/IEC 9899 :
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. EEEEXXXXPPPP((((3333MMMM))))                                                                EEEEXXXXPPPP((((3333MMMM))))
  137.  
  138.  
  139.  
  140.      1990 (E).
  141.  
  142.      Long double functions have been renamed to be compliant with the ANSI-C
  143.      standard, however to be backward compatible, they may still be called
  144.      with the double precision function name prefixed with a q.
  145.  
  146.      Pow(x,0) returns x**0 = 1 for all x including x = 0 and Infinity.
  147.      Previous implementations of pow defined _N_a_N**0 to be 1 as well, but this
  148.      behavior has been changed to conform to the IEEE standard.  Here are
  149.      reasons for returning x**0 = 1 in all other cases:
  150.  
  151.      (1) Any program that already tests whether x is zero (or infinite) before
  152.          computing x**0 cannot care whether 0**0 = 1 or not. Any program that
  153.          depends upon 0**0 to be invalid is dubious anyway since that
  154.          expression's meaning and, if invalid, its consequences vary from one
  155.          computer system to another.
  156.  
  157.      (2) Some Algebra texts (e.g. Sigler's) define x**0 = 1 for all x,
  158.          including x = 0.  This is compatible with the convention that accepts
  159.          a[0] as the value of polynomial
  160.                p(x) = a[0]*x**0 + a[1]*x**1 + a[2]*x**2 +...+ a[n]*x**n
  161.  
  162.          at x = 0 rather than reject a[0]*0**0 as invalid.
  163.  
  164.      (3) Analysts will accept 0**0 = 1 despite that x**y can approach anything
  165.          or nothing as x and y approach 0 independently.  The reason for
  166.          setting 0**0 = 1 anyway is this:
  167.  
  168.          If x(z) and y(z) are _a_n_y functions analytic (expandable in power
  169.          series) in z around z = 0, and if there x(0) = y(0) = 0, then
  170.          x(z)**y(z) -> 1 as z -> 0.
  171.  
  172.      (4) If 0**0 = 1, then infinity**0 = 1/0**0 = 1 too; and because x**0 = 1
  173.          for all finite and infinite non-_N_a_N x.
  174.  
  175. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  176.      math(3M), matherr(3M)
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.